package yawning.mew.gui.characters.attributes;

import javax.swing.JPanel;

import yawning.mew.gui.tools.CharacterDataSource;

import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.RowSpec;

@SuppressWarnings("serial")
public class AttributeContainer extends JPanel {
	CharacterDataSource toon;
	
	
	public AttributeContainer(CharacterDataSource toon) {
		this.toon = toon;
		setLayout(new FormLayout(
			new ColumnSpec[] {
				ColumnSpec.decode("300px"),
				ColumnSpec.decode("300px")},
			new RowSpec[] {
				RowSpec.decode("fill:230px"),
				RowSpec.decode("fill:230px:grow"),}));
		
		GeneralAttributes generalAttributes = new GeneralAttributes(toon);
		add(generalAttributes, "1, 1, default, fill");
		
		MeleeAttributes meleeAttributes = new MeleeAttributes(toon);
		add(meleeAttributes, "1, 2, fill, fill");
		
		MagicAttributes magicAttributes = new MagicAttributes(toon);
		add(magicAttributes, "2, 2, fill, fill");
		
		DefensesAttributes defensesAttributes = new DefensesAttributes(toon);
		add(defensesAttributes, "2, 1, fill, fill");
	}
}
